package com.wyj;

public class father {
    private String fatherName;
    private int fatherAge;

    public father() {
    }

    public father(String fatherName, int fatherAge) {
        this.fatherName = fatherName;
        this.fatherAge = fatherAge;
    }

    public String getFatherName() {
        return fatherName;
    }

    public void setFatherName(String fatherName) {
        this.fatherName = fatherName;
    }

    public int getFatherAge() {
        return fatherAge;
    }

    public void setFatherAge(int fatherAge) {
        this.fatherAge = fatherAge;
    }


    public static void main(String[] args) {
        son son = new son();
        son.setFatherAge(100);
        son.setFatherName("wsq");
        son.setSonName("wyj");

    }
}

class son extends father {
    private String sonName;

    public son() {};
    public son(String sonName) {
        super();
        this.sonName = sonName;
    }

    public String getSonName() {
        return sonName;
    }

    public void setSonName(String sonName) {
        this.sonName = sonName;
    }

    @Override
    public String toString() {
        return "son{" +
                "sonName='" + sonName + '\'' +
                '}';
    }
}
